const express = require("express");
const router = express.Router();

const MySql = require("../lib/mysql");

router.post("/userPractice",async(req,res,next) => {



    const userId = req.body.id;
    const id = req.body.user_id;
    const start = req.body.start_time;
    const end = req.body.end_time;
    const praExp = req.body.practice_exp;
    const company = req.body.company;
    


        const resInsert = await MySql.query('insert practice_exp(id,user_id,start_time,end_time,practice_exp,company) values(?,?,?,?,?,?)',[id,userId,start,end,praExp,company])
        console.log(resInsert);
        res.json({
            id:resInsert.insertId,
            code:1,
            message:'practice保存成功',
        })
    

        
    
   

});

module.exports = router;